<template>
  <div>
    <h1>count:{{ a }}</h1>
  </div>
</template>

<script lang="ts">
  import { defineComponent } from "vue";
  export default defineComponent({
    name: "Count",
  });
</script>
<script lang="ts" setup>
  import { ref } from "vue";
  const a = ref(1);

  //defineExpose 接收一个对象作为参数，对象内部书写那些响应式数据运行其他组件通过当前组件实例获取
  defineExpose({
    a,
  });
</script>

<style lang="scss" scoped></style>
